In order to complete the first lab checkout on time, the following reading and problems should be completed before the start of the first lab section for this lab.
- The lab webpage. - It is extremely critical that you read the entire webpage for this lab before the start of the first lab section.
- Phenomenological PID introduction
- Analytical PID introduction
- ADC (Reference Manual Section 17)
- Output Compare (Reference Manual Section 16)
- PLIB Manual (Section 13)
- PLIB Manual (Section 18)
Explain in detail why there is a diode across the motor in lab 3. Include the direction of inductive current flow during each part of the PWM cycle.
Explain the physics in the Matlab/Python code. Do so by converting the code back into mathematical expressions and explaining each equation.
What MCU hardware is used by ProtoThreads? Can you use Timer 2 for your own code? How about Timer 3 or Timer 5?
How could you measure the CPU load caused by the motor control ISR running at 1kHz?
Write the code to setup a Timer 2 ISR running at 1000Hz, assuming a CPU clock cycle of 40MHz.
Suppose you have a motor controller with only proportional gain, and you see oscillating behavior. How will you augment your controller to suppress these oscillations?